/********************************************
*
*
********************************************/

#ifdef __cplusplus
#if __cplusplus
extern "C"{
#endif
#endif /* __cplusplus */

#include "d_def.h"

#ifndef __D_VBUSQUEUE_H__
#define __D_VBUSQUEUE_H__


#define DMS_ERR_VBUS_HAVE_NODE  DMS_ERROR_OFFSET(DMS_VBUS_MODULE,1)
#define DMS_ERR_VBUS_EMPTY      DMS_ERROR_OFFSET(DMS_VBUS_MODULE,2)
#define DMS_ERR_VBUS_FULL       DMS_ERROR_OFFSET(DMS_VBUS_MODULE,3)


/* "vbus" */
#define DMS_VBUS_MAGIC_NUM          0x76627573

#define DMS_VBUSQUEUE_TYPE_STATIC   0
#define DMS_VBUSQUEUE_TYPE_DYNAMIC  1

#define DMS_VBUSQUEUE_MODE_STATIC   0
#define DMS_VBUSQUEUE_MODE_DYNAMIC  1

typedef VOID * DMS_VBUS_HANDLE;

extern UINT32 DMS_VbusCreate(DMS_VBUS_HANDLE * pHandle,
                             UINT32            ulMode,
                             UINT32            ulCount);

extern UINT32 DMS_VbusWrite(DMS_VBUS_HANDLE * pHandle,VOID * pElem);

extern UINT32 DMS_VbusRead(DMS_VBUS_HANDLE * pHandle,VOID ** ppElem);

extern UINT32 DMS_VbusDelete(DMS_VBUS_HANDLE * pHandle);


#endif

#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */



